package com.zbkj.admin.controller;

import com.zbkj.admin.model.system.SystemForm;
import com.zbkj.admin.result.CommonResult;
import com.zbkj.admin.service.SystemFormService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * 系统表单控制器
 *
 * @author Han
 * @version 1.0.0
 * @Date 2024/8/26
 */
@Slf4j
@RestController
@RequestMapping("api/front/system/form")
@Tag(name = "系统表单控制器")
public class SystemFormFrontController {

    @Autowired
    private SystemFormService systemFormService;

    @Operation(summary = "系统表单详情")
    @RequestMapping(value = "/detail/{id}", method = RequestMethod.GET)
    public CommonResult<SystemForm> getDetail(@PathVariable("id") Integer id) {
        return CommonResult.success(systemFormService.getFrontDetail(id));
    }

}
